package org.wsff.tools.api.gateway.demo;

import java.util.UUID;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.wsff.tools.api.gateway.demo.model.TestRequest;
import org.wsff.tools.api.gateway.demo.model.TestResponse;

/**
 * App
 * @author ryan
 * @version Id: App.java, v 0.1 2022-04-02 15:35 ryan Exp $$
 */
public class App {
    public static void main(String[] args) {
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext("org.wsff.tools.api.gateway");
        context.start();

        ExampleFacade exampleFacade = context.getBean(ExampleFacade.class);

        TestRequest request = new TestRequest();
        request.setTracerId(UUID.randomUUID().toString());
        request.setReason("hello, i am ryan");
        TestResponse response = exampleFacade.test(request);
        System.out.println("do return:" + response.getMessage());
    }
}
